﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style x:Key="TeamMemberNameLabel" TargetType="{x:Type TextBlock}">
        <Setter Property="FontSize" Value="64" />
        <Setter Property="Margin" Value="3,0" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Bottom" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="Effect">
            <Setter.Value>
                <DropShadowEffect ShadowDepth="5" BlurRadius="5" Opacity="0.5" />
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="InfoLabel" TargetType="{x:Type TextBlock}">
        <Setter Property="FontSize" Value="56" />
        <Setter Property="FontWeight" Value="Light" />
        <Setter Property="Opacity" Value="0.7" />
        <Setter Property="Padding" Value="5" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Bottom" />
    </Style>

    <Style x:Key="NumericValueLabel" TargetType="{x:Type TextBlock}">
        <Setter Property="FontSize" Value="56" />
        <Setter Property="FontStyle" Value="Italic" />
        <Setter Property="Padding" Value="5" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="VerticalAlignment" Value="Bottom" />
    </Style>

    <LinearGradientBrush x:Key="LinearSeparatorLineBrush">
        <GradientStop Color="#FF000000" Offset="1"/>
        <GradientStop Color="#00FFFFFF" Offset="0"/>
    </LinearGradientBrush>

    <RadialGradientBrush x:Key="SeparatorLineBrush">
        <GradientStop Color="#FF000000" Offset="0"/>
        <GradientStop Color="#C0000000" Offset="0.75"/>
        <GradientStop Color="#10FFFFFF" Offset="1"/>
    </RadialGradientBrush>

    <DataTemplate x:Key="AvatarDataTemplate">
        <Grid>
            <Grid.Style>
                <Style TargetType="{x:Type Grid}">
                    <Setter Property="Visibility" Value="Visible"/>

                    <Style.Triggers>
                        <DataTrigger Binding="{Binding AvatarImageSource}" Value="{x:Null}">
                            <Setter Property="Visibility" Value="Collapsed"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Grid.Style>

            <Rectangle>
                <Rectangle.Effect>
                    <DropShadowEffect/>
                </Rectangle.Effect>
            </Rectangle>

            <Image Source="{Binding AvatarImageSource}" Stretch="Fill" Width="96" Height="96" Margin="0,0,12,0" />
        </Grid>
    </DataTemplate>

    <Style x:Key="GlowOnUpdateStyle" TargetType="{x:Type FrameworkElement}">
        <Setter Property="Opacity" Value="0" />
        
        <!-- Create a glow effect -->
        <Setter Property="Effect">
            <Setter.Value>
                <DropShadowEffect BlurRadius="60" Color="Gold" ShadowDepth="0" />
            </Setter.Value>
        </Setter>

        <Style.Triggers>
            <DataTrigger Binding="{Binding RecentlyUpdated}" Value="True">
                <DataTrigger.EnterActions>
                    <BeginStoryboard Name="GlowStoryboard">
                        <Storyboard>
                            <!-- Animate the Opacity to 1 over two seconds. -->
                            <DoubleAnimation BeginTime="00:00:05" Duration="00:00:02" Storyboard.TargetProperty="Opacity" To="1" />
                            <ParallelTimeline BeginTime="00:00:09" AutoReverse="True" RepeatBehavior="Forever">
                                <!-- Animate the Color to White and back over two seconds. -->
                                <ColorAnimation Duration="00:00:02" Storyboard.TargetProperty="Effect.Color" To="White" />
                            </ParallelTimeline>
                        </Storyboard>
                    </BeginStoryboard>
                </DataTrigger.EnterActions>
                <DataTrigger.ExitActions>
                    <StopStoryboard BeginStoryboardName="GlowStoryboard" />
                    
                    <BeginStoryboard>
                        <Storyboard>
                            <ParallelTimeline>
                                <!-- Animate the Opacity to 0 over five seconds. -->
                                <DoubleAnimation Duration="00:00:05" Storyboard.TargetProperty="Opacity" To="0"/>
                                <!-- Animate the Color to Gold over two seconds. -->
                                <ColorAnimation Duration="00:00:05" Storyboard.TargetProperty="Effect.Color" To="Gold" />
                            </ParallelTimeline>
                        </Storyboard>
                    </BeginStoryboard>
                </DataTrigger.ExitActions>
            </DataTrigger>
        </Style.Triggers>
    </Style>
    
    <DataTemplate x:Key="GlassPanel">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="0.507*"/>
                <RowDefinition Height="0.493*"/>
            </Grid.RowDefinitions>

            <Border HorizontalAlignment="Stretch" Margin="0,0,0,0" x:Name="shine" Width="Auto" CornerRadius="2,32,0,0">
                <Border.Background>
                    <LinearGradientBrush EndPoint="0.494,0.889" StartPoint="0.494,0.028">
                        <GradientStop Color="#77FFFFFF" Offset="0"/>
                        <GradientStop Color="#22FFFFFF" Offset="1"/>
                    </LinearGradientBrush>
                </Border.Background>
            </Border>
        </Grid>
    </DataTemplate>
</ResourceDictionary>